<?php include "includes/comunes.php";

$where="";

if($_POST['delega'])
  $where.= " and InternoArea like '%".strtoupper(trim($_POST['delega']))."%'";
  
if($_POST['gerencia']<>0)
  $where.= " and InternoGerencia =".strtoupper(trim($_POST['gerencia']));

$tabla="internos";
$condicion=" InternoActivo=1 ".$where;
$orden=" order by InternoGerencia asc, InternoArea asc,InternoNumero asc ";
$res=cons_sql($tabla,$condicion,$orden);

//echo $where;
//seteo titulo de la pagina
$titulo="Internos";

 ?>
<html class="no-js"> <!--<![endif]-->
<head>
      <?php include "includes/metas.php";?>
    </head>
<body>

 <?php include "includes/nav.php";?>
 <?php include "includes/header.php";?>    
 <?php include "includes/menu.php";?>  

<div class="container">
<div class="row">
</div>
</div>

<div class="space"></div>
<div class="container">
<div class="row">
<div class="col-md-12 col-sm-12">
<div class="art"><h3><div class="destaca">Internos</div></h3>
<div class="row">
<div class="col-md-8 col-sm-8">

 <a href="internos.php">Ver Todas</a>

</div>

</div>
<div class="row">
<div class="col-md-8 col-sm-8">
<?php while($reg=mysql_fetch_array($res)):?>
<h4><b><span class="label label-primary"> <?php echo utf8_encode(obtener_gerencia($reg['InternoGerencia']))?> </span> &nbsp;&nbsp<?php echo strtoupper(utf8_encode($reg['InternoArea']))?> </b>  &nbsp;&nbsp; <span class="glyphicon glyphicon-phone-alt" aria-hidden="true"></span> &nbsp;Interno : <b><?php echo utf8_encode($reg['InternoNumero'])?></h4>

<hr>
<?php endwhile?>

</div>
<div class="col-md-4 col-sm-4">
<form role="search" method="POST" action="internos.php">
<div class="form-group">
    <select name="gerencia" class="form-control">
	<option value="0">Seleccione Gerencia</option>
	 <?php $tabla="gerencias";
	 $condicion=" 1=1";
	 $orden=" order by GerenciaNombre asc ";
	 $ResSql1=cons_sql($tabla,$condicion,$orden) ;
	 while($reg=mysql_fetch_array($ResSql1)):?>
	 <option value="<?php echo $reg['GerenciaId']?>"><?php echo utf8_encode($reg['GerenciaNombre'])?></option>
	 <?php endwhile?>
	</select><br>
    <input type="text" class="form-control" name="delega" placeholder="INGRESE AREA"> 
 </div>
 <button type="submit" class="btn btn-default">Buscar</button>
</form>

<div class="list-group">
  <a href="#" class="list-group-item active">
    <h4 class="list-group-item-heading">Central Telefonica</h4>
    <p class="list-group-item-text"><b>(362) 4414400 al 4414499</b></p>
  </a>
  <a href="#" class="list-group-item ">
    <h4 class="list-group-item-heading">Telefono para denuncias por Cobro de Plus</h4>
    <p class="list-group-item-text"><b>0800-888-PLUS(7587)</b></p>
  </a>
  <a href="#" class="list-group-item ">
    <h4 class="list-group-item-heading">Celular para denuncias por Cobro de Plus</h4>
    <p class="list-group-item-text"><b>(362) 4810229</b></p>
  </a>
   <a href="#" class="list-group-item">
    <h4 class="list-group-item-heading">Direccion Casa Central</h4>
    <p class="list-group-item-text"><b>Av. 9 de Julio 347 • (H3500ABD) Resistencia, Chaco. República Argentina</b></p>
  </a>
</div>



</div>
 </div>


<a href="index.php"><button type="button" class="btn btn-default btn-sm">Inicio</button></a></div>
</div></div>
<div class="linea"></div>
<?php include "includes/menuInferior.php";?> 
<div class="linea"></div>
<?php include "includes/footer.php";?> 

 <?php include "includes/js.php";?>  
    </body>
</html>
